package com.topideal.supplychain.hades.schedule;

import org.springframework.stereotype.Component;


/**
 * 运力规则的剩余量定时任务
 * 
 * @author :hxf
 * @date :2017年10月11日
 */
@Component
public class CapacityRuleRemainSchedule {
    /*@Autowired
    private CapacityRuleService capacityRuleService;

    @Scheduled(cron = "0 0 22 * * ?") // 每天晚上10点跑
    public void recoverRemainNum() {
        CapacityRule capacityRuleFilter = new CapacityRule();
        List<CapacityRule> capacityRuleList = capacityRuleService.findByFilte(capacityRuleFilter);
        for (CapacityRule capacityRule : capacityRuleList) {
            capacityRule.setCardDeliverRemain(capacityRule.getCardDeliverLimit());
            capacityRule.setCashDeliverRemain(capacityRule.getCashDeliverLimit());
            capacityRule.setAssignedDateRemain(capacityRule.getAssignedDateLimit());
            capacityRule.setOrdinaryExpressRemain(capacityRule.getOrdinaryExpressLimit());
            capacityRule.setJusdaRemain(capacityRule.getJusdaLimit());
            capacityRuleService.update(capacityRule);
        }

    }*/
}
